
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
is-any-array
Advanced tools
Check if toString.call ends with Array
$ npm install is-any-array
const isAnyArray = require('is-any-array');
isAnyArray(1); // false
isAnyArray('ab'); // false
isAnyArray({ a: 1 }); // false
isAnyArray([1, 2, 3]); // true
isAnyArray(new Uint16Array(2))) // true;
The is-array package provides a simple utility to check if a value is an array. It is similar to is-any-array but does not support array-like objects such as typed arrays.
The lodash.isarray package is a part of the Lodash library that specifically checks if a value is an array. It offers similar functionality to is-any-array but is part of a larger utility library.
The arrayify package converts a value to an array if it is not already one. While it doesn't directly check if a value is an array, it ensures that the value can be safely used as an array, providing a different approach to handling array-like values.
FAQs
Check if a value is any kind of array
We found that is-any-array demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.